import { CorporateEntityCategory } from '../models';


export async function getDefaultCategory(){
    const rlt =  await CorporateEntityCategory.findOrCreate(
        {
            where: {
                isDefault: true
            }, 
            defaults: {
                createdAt: new Date(),
                updatedAt: new Date(),
                name: "默认分类"
        }
    });
    
    const [entityCate, created] = rlt;

    return entityCate.get({
        plant: true,
    });
}